package cuiyt.datastructure.set;

/**
 * @author cyt
 * @create 2021-01-12 下午 10:35
 */
public interface Set<E> {

    int size();

    void clear();

    boolean contains(E element);

    boolean isEmpty();

    void add(E element);

    void remove(E element);

    void traversal(Visitor<E> visitor);

    public static abstract class Visitor<E> {
        boolean stop;

        public abstract boolean visit(E element);
    }
}
